<template>
  <li class="video_card">
    <div class="video_img">
      <img src="../assets/img/bg1.jpeg" alt="" />
      <div class="video_bg">
        <p  v-for="(ifem,i) in lisData.syn" :key="i">{{ifem}}</p>
        <i class="el-icon-view">{{lisData.looks}}播放量</i>
        <span class="el-icon-video-play"></span>
      </div>
    </div>
    <h4 @click="videoParticulars(lisData.id,lisData.writer_id)">{{ lisData.title }}</h4>
    <p>
      <i class="el-icon-user-solid">{{ lisData.writer }}</i
      ><span>{{ lisData.time }}</span>
    </p>
  </li>
</template>

<script>
export default {
  data() {
    return {
      lisData: this.liData,
    };
  },
  props: ["liData"],
  name: "VideoCard",
  created(){
    this.lisData.syn=this.liData.synopsis.split('//');
  },
  methods:{
    videoParticulars(id1,id2){
      this.$router.push({
        path: "/Details/video",
        query: { video: id1, writerID: id2 },
      });
    }
  }
};
</script>

<style>
.video_card {
  cursor: pointer;
  background-color: #fff;
}
.video_card >h4{
    padding: 10px;
    box-sizing: border-box;
    border-right: 1px solid #DCDFE6;
    border-left: 1px solid #DCDFE6;
}
.video_card >p{
    font-size: 14px;
    padding: 10px;
    color: #909399;
    box-sizing: border-box;
    border-right: 1px solid #DCDFE6;
    border-left: 1px solid #DCDFE6;
    border-bottom: 1px solid #DCDFE6;
}
.video_card >p>span{
    float: right;
}
.video_img {
  width: 250px;
  height: 140px;
  position: relative;
  overflow: hidden;
}
.video_bg {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  position: absolute;
  top: 95px;
  padding: 10px;
  transition: 0.5s;
  /* background-color: rgba(0,0,0,0.7); */
}
.video_bg > p {
  line-height: 30px;
  color: white;
  text-indent: 1em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.video_bg > span {
  color: #fff;
  opacity: 0;
  font-size: 30px;
  font-weight: 700;
  transition: 1.5s;
  position: absolute;
  bottom: 10px;
  right: 10px;
}
.video_bg > i {
  color: #fff;
  position: absolute;
  bottom: 10px;
  left: 10px;
}
.video_img:hover .video_bg {
  top: 0;
  background-color: rgba(0, 0, 0, 0.7);
}
.video_img:hover .video_bg > span {
  opacity: 10;
}
</style>
